package com.jic.market.mapper.activity;

import java.lang.Long;
import java.util.List;


import com.jic.market.entity.activity.ActivityPriority;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 活动优先级
 * @author : 
 * @email : 
 * @since : 2020-03-15 04:32:42
 * @version : v1.0.0
 */
@Mapper
public interface  ActivityPriorityMapper {

    long insert(ActivityPriority activityPriority);

    long delete(Long id);

    long update(ActivityPriority activityPriority);

    ActivityPriority queryByPrimaryKey(Long id);

    List<ActivityPriority> query(ActivityPriority activityPriority);

    List<ActivityPriority> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("activityPriority") ActivityPriority activityPriority);

    long queryPageCount(ActivityPriority activityPriority);

    /**
     * @Autor:zhaowei
     * @Date: 2020/4/22 11:36
     * @Description: 根据排序值与类型查询出对应上面或下面的一条数据
     */
    ActivityPriority queryPriorityInfoBySort(@Param("sort") Long sort,@Param("sortType")  Integer sortType);
    /**
    * @Autor:zhaowei
    * @Date: 2020/4/22 11:37
    * @Description: 根据id、sort更新排序
    */
    void updateSort(@Param("id") Long id,@Param("sort") Long sort);
}